package ca.tatham.scheduler.simulate;

import ca.tatham.scheduler.Task;

public class BasicSimulation extends AbstractSchedulerSimulation {

	public static void main(String[] args) throws Exception {
		BasicSimulation simulation = new BasicSimulation();
		simulation.simulate();
	}

	private void simulate() throws Exception {
		TaskDiagram d = new TaskDiagram(4);

		final Task task1 = new SimulatedTask("Task1", 1, d.addTask('1'), 10,
				null);
		final Task task2 = new SimulatedTask("Task2", 2, d.addTask('2'), 20,
				null);
		final Task task3 = new SimulatedTask("Task3", 3, d.addTask('3'), 20,
				null);
		final Task task4 = new SimulatedTask("Task4", 4, d.addTask('4'), 15,
				null);

		Task[] tasks = new Task[] { task3, task1, task2, task4 };
		int[] delays = new int[] { 0, 0, 0, 0 };
		execute(d, tasks, delays);
	}

}
